YES 0.983 H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/List.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:



HASKELL
  ↳ CR

mainModule List
  ((insert :: Ordering  ->  [Ordering ->  [Ordering]) :: Ordering  ->  [Ordering ->  [Ordering])

module List where
  import qualified Maybe
import qualified Prelude

  insert :: Ord a => a  ->  [a ->  [a]
insert e ls insertBy compare e ls

  insertBy :: (a  ->  a  ->  Ordering ->  a  ->  [a ->  [a]
insertBy x [] x : []
insertBy cmp x ys@(y : ys'
case cmp x y of
  GT-> y : insertBy cmp x ys'
  _-> x : ys


module Maybe where
  import qualified List
import qualified Prelude



Case Reductions:
The following Case expression
case cmp x y of
 GT → y : insertBy cmp x ys'
 _ → x : ys

is transformed to
insertBy0 y cmp x ys' ys GT = y : insertBy cmp x ys'
insertBy0 y cmp x ys' ys _ = x : ys



↳ HASKELL
  ↳ CR
HASKELL
      ↳ BR

mainModule List
  ((insert :: Ordering  ->  [Ordering ->  [Ordering]) :: Ordering  ->  [Ordering ->  [Ordering])

module List where
  import qualified Maybe
import qualified Prelude

  insert :: Ord a => a  ->  [a ->  [a]
insert e ls insertBy compare e ls

  insertBy :: (a  ->  a  ->  Ordering ->  a  ->  [a ->  [a]
insertBy x [] x : []
insertBy cmp x ys@(y : ys'insertBy0 y cmp x ys' ys (cmp x y)

  
insertBy0 y cmp x ys' ys GT y : insertBy cmp x ys'
insertBy0 y cmp x ys' ys _ x : ys


module Maybe where
  import qualified List
import qualified Prelude



Replaced joker patterns by fresh variables and removed binding patterns.
Binding Reductions:
The bind variable of the following binding Pattern
ys@(vy : vz)

is replaced by the following term
vy : vz



↳ HASKELL
  ↳ CR
    ↳ HASKELL
      ↳ BR
HASKELL
          ↳ COR

mainModule List
  ((insert :: Ordering  ->  [Ordering ->  [Ordering]) :: Ordering  ->  [Ordering ->  [Ordering])

module List where
  import qualified Maybe
import qualified Prelude

  insert :: Ord a => a  ->  [a ->  [a]
insert e ls insertBy compare e ls

  insertBy :: (a  ->  a  ->  Ordering ->  a  ->  [a ->  [a]
insertBy vx x [] x : []
insertBy cmp x (vy : vzinsertBy0 vy cmp x vz (vy : vz) (cmp x vy)

  
insertBy0 y cmp x ys' ys GT y : insertBy cmp x ys'
insertBy0 y cmp x ys' ys vw x : ys


module Maybe where
  import qualified List
import qualified Prelude



Cond Reductions:
The following Function with conditions
compare x y
 | x == y
 = EQ
 | x <= y
 = LT
 | otherwise
 = GT

is transformed to
compare x y = compare3 x y

compare1 x y True = LT
compare1 x y False = compare0 x y otherwise

compare2 x y True = EQ
compare2 x y False = compare1 x y (x <= y)

compare0 x y True = GT

compare3 x y = compare2 x y (x == y)

The following Function with conditions
undefined 
 | False
 = undefined

is transformed to
undefined  = undefined1

undefined0 True = undefined

undefined1  = undefined0 False



↳ HASKELL
  ↳ CR
    ↳ HASKELL
      ↳ BR
        ↳ HASKELL
          ↳ COR
HASKELL
              ↳ Narrow

mainModule List
  (insert :: Ordering  ->  [Ordering ->  [Ordering])

module List where
  import qualified Maybe
import qualified Prelude

  insert :: Ord a => a  ->  [a ->  [a]
insert e ls insertBy compare e ls

  insertBy :: (a  ->  a  ->  Ordering ->  a  ->  [a ->  [a]
insertBy vx x [] x : []
insertBy cmp x (vy : vzinsertBy0 vy cmp x vz (vy : vz) (cmp x vy)

  
insertBy0 y cmp x ys' ys GT y : insertBy cmp x ys'
insertBy0 y cmp x ys' ys vw x : ys


module Maybe where
  import qualified List
import qualified Prelude



Haskell To QDPs


↳ HASKELL
  ↳ CR
    ↳ HASKELL
      ↳ BR
        ↳ HASKELL
          ↳ COR
            ↳ HASKELL
              ↳ Narrow
QDP
                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

new_insertBy(EQ, :(LT, ww41)) → new_insertBy(EQ, ww41)
new_insertBy(GT, :(LT, ww41)) → new_insertBy(GT, ww41)
new_insertBy(GT, :(EQ, ww41)) → new_insertBy(GT, ww41)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs.

↳ HASKELL
  ↳ CR
    ↳ HASKELL
      ↳ BR
        ↳ HASKELL
          ↳ COR
            ↳ HASKELL
              ↳ Narrow
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
QDP
                        ↳ ATransformationProof
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

new_insertBy(GT, :(LT, ww41)) → new_insertBy(GT, ww41)
new_insertBy(GT, :(EQ, ww41)) → new_insertBy(GT, ww41)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We have applied the A-Transformation [17] to get from an applicative problem to a standard problem.

↳ HASKELL
  ↳ CR
    ↳ HASKELL
      ↳ BR
        ↳ HASKELL
          ↳ COR
            ↳ HASKELL
              ↳ Narrow
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                        ↳ ATransformationProof
QDP
                            ↳ QDPSizeChangeProof
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GT(LT(ww41)) → GT(ww41)
GT(EQ(ww41)) → GT(ww41)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ HASKELL
  ↳ CR
    ↳ HASKELL
      ↳ BR
        ↳ HASKELL
          ↳ COR
            ↳ HASKELL
              ↳ Narrow
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
QDP
                        ↳ ATransformationProof

Q DP problem:
The TRS P consists of the following rules:

new_insertBy(EQ, :(LT, ww41)) → new_insertBy(EQ, ww41)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We have applied the A-Transformation [17] to get from an applicative problem to a standard problem.

↳ HASKELL
  ↳ CR
    ↳ HASKELL
      ↳ BR
        ↳ HASKELL
          ↳ COR
            ↳ HASKELL
              ↳ Narrow
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                        ↳ ATransformationProof
QDP
                            ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

EQ1(LT(ww41)) → EQ1(ww41)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: